<template>
  <!-- 全局主要节点组件 -->
  <div>
    <div v-for="(item,index) in dataList" :key="item.stepId">
      <initiate v-if="item.type=='initiate'" :info='item'></initiate>
      <approve v-if="item.type=='approve'&&item.prevStepId==dataList[index-1].stepId" :info='item' > </approve> 
      <!-- <make v-if="item.type=='make'&&item.prev==dataList[index-1].id" :info='item'></make> -->
      <branch v-if="(item.type=='parallelBranch'||item.type=='anyBranch'||item.type=='conditionBranch')&&item.prevStepId==dataList[index-1].stepId" :info='item' ></branch>
      <regular v-if="item.type=='regular'&&item.prevStepId==dataList[index-1].stepId" :info='item'></regular>
    </div>
    
  </div>
</template>
<script>
  import initiate from './node/initiate.vue' // 发起人
  import approve from './node/approveNode.vue' // 审核人
  import regular from './node/regular.vue' // 固定节点
  // import make from './node/make.vue' // 抄送人
  import branch from './node/branch.vue' // 分支
  import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
  export default {
	components: {
    initiate,
		approve,
    // make,
    branch,
    regular
	},
	data() {
		return {
			newData:[]
		};
	},
  computed:{
    ...mapState({
      dataList: state => state.dataList,
    }),
  },
	created() {
		
	},
  mounted(){
    
  },
	methods: {
		
	}
};
</script>
<style>
.error_tip {
    position: absolute;
    top: 0px;
    right: 0px;
    transform: translate(150%, 0px);
    font-size: 24px;
}

.promoter_person .el-dialog__body {
    padding: 10px 20px 14px 20px;
}

.selected_list {
    margin-bottom: 20px;
    line-height: 30px;
}

.selected_list span {
    margin-right: 10px;
    padding: 3px 6px 3px 9px;
    line-height: 12px;
    white-space: nowrap;
    border-radius: 2px;
    border: 1px solid rgba(220, 220, 220, 1);
}

.selected_list img {
    margin-left: 5px;
    width: 7px;
    height: 7px;
    cursor: pointer;
}
</style>